local prefix = "<leader>r"
local maps = { n = {} }
-- local icon = vim.g.icons_enabled and "󰁕 " or ""
local icon = "󰁕 "
maps.n[prefix] = { desc = icon .. "RunCode" }
require("astrocore").set_mappings(maps)

return {
  "CRAG666/code_runner.nvim",
  lazy = true,
  keys = {
    { mode = { "n", "v" }, "<leader>rr", "<cmd>RunCode<CR>", desc = "RunCode" },
    { mode = { "n", "v" }, "<leader>rc", "<cmd>RunClose<CR>", desc = "RunClose" },
  },
  opts = {
    focus = false,
    filetype = {
      lua = "lua",
      python = "python3",
      javascript = "node",
      typescript = "ts-node",
    },
  },
}
